#文件打开open()encoding=utf-8
#open()打开一个文件对象
f = open('111.txt','r',encoding = 'utf-8')
print(f.read())
#读取文件内容
with open('111.txt','r',encoding = 'utf-8') as file:
 text = file.read()
 print(text)
 #写文件write()
 data ='hello world'
 f1 = open('333.txt','w',encoding ='utf-8')
 f1.write('helloween, helloween')
 f1.close()